Repository navigation
chore: retire the bundled overLIB library - #337
Conversation
MakeHTML() emits data-hover/data-caption attributes for the Cacti viewer, so the overDiv container and overlib.js script tag written by the command-line HTML wrapper did nothing except request a missing file. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
docs/example/overlib.js was only loaded by the static example page and built code strings for eval(). The plugin viewer renders HTMLSTYLE overlib hovers from data-hover with js/weathermap.js and never loaded it. The example page now uses plain title captions. Add a guard against overlib.js, eval() and code-string timers in the shipped JavaScript and documentation, an engine render of example.conf that checks hover content without overLIB, and a jsdom check of the static example page. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Newer libpng, as used by the PHP 8.6 CI leg, warns about the sRGB profile embedded in docs/example/my_router.png. Ignore only that message while the example is read and drawn; any other warning still fails the test. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The test loads the repository's own js/weathermap.js into its jsdom context through vm.runInContext, as jsdom documents. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…e render" This reverts commit 3b19a5c. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
libpng 1.6 prints "iCCP: known incorrect sRGB profile" whenever the example map loads my_router.png, which fails the docs example render on the PHP 8.6 CI leg. Remove the iCCP chunk; the decoded pixels are unchanged. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Keep tests/Browser/README.md as on develop so this PR does not conflict with the README rewrite in #333. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
|
|
Tested The distinction in the docs is useful here: this removes the old overLIB library and changes the standalone example to simple captions, but keeps OVERLIBGRAPH and the current Cacti viewer's hover handling. The combined automated viewer tests passed once #333 was included. |
alcatron
left a comment
There was a problem hiding this comment.
The combined batch, including the updated editor tests, passes 648 PHP tests and all 33 browser test files. No further issue found in my review of the overLIB removal; the current viewer hover tests pass. Looks good to me.



Fixes #335
Remove docs/example/overlib.js, which built code strings for
eval().data-hoverthrough js/weathermap.js.titlecaptions, and the docs say so.weathermap) no longer writesoverDivor a script tag for the unshipped overlib.js. This is a separate commit, so it can be dropped on its own.eval(),new Function()or string timers;